import React from 'react';
import PropTypes from 'prop-types';
import DefaultModal from '@welab/fx-ui/components/Modal';
// import fn from '@welab/fx-ui/components/PlateformHalf';
import { modal } from '../theme';

const Modal = ({ children, ...rest }) => (<DefaultModal {...rest} >{children}</DefaultModal>);


Modal.defaultProps = {
  children: null,
  url: '',
  theme: modal.modelTheme,
};
Modal.propTypes = {
  /**
   * ### Modal 属性说明
   *
   * 模态弹框
   *
   * | Name | Type | Default | Details | isRequired |
   * | ------:| -----------:| -----------: | -----------: | ------:|
   * | theme | object | | 主题 | yes|
   * | desc | string | | 描述文字 |yes|
   * | title | string | | 标题文字 |yes|
   * | url | string |  | 顶部的图标（图片的url地址） |no|
   * | children | object |  | 子元素(按钮) |no|
   *
   * ### Modal 代码示例(详见示例项目)
   *
   * ```html
   * <Modal theme={Modal} desc="描述文字"><Button>primary</Button></Modal>
   * ```
   */
  theme: PropTypes.instanceOf(Object),
  desc: PropTypes.string.isRequired,
  title: PropTypes.string.isRequired,
  url: PropTypes.string,
  children: PropTypes.instanceOf(Object),
};

export default Modal;
